Effective meta-programming in declarative languages

نویسنده

  • Antony Francis Bowers
چکیده

Declarative meta-programming is vital, since it is the most promising means by which programs can be made to reason about other programs. A metaprogram is a program that takes another program, called the object program, as data. A declarative programming language is a programming language based on a logic that has a model theory. A meta-program operates on a representation of an object program. In a non-ground representation, object-level variables are represented by metavariables; in a ground representation, object-level variables are represented by ground terms. The non-ground representation is insu ciently expressive for most meta-programming tasks. The ground representation is adequately expressive, but meta-programs are complex and laborious to write, and the overhead of interpretation is excessive. Godel is a declarative programming language based on rst-order logic. It has types and modules, improves on the expressiveness and declarative semantics of Prolog, and provides extensive support for meta-programming in the ground representation. This thesis contributes to the design of Godel's meta-programming facilities, and investigates the techniques required to make declarative metaprogramming practical. The representation of Godel object programs as ground terms is described. Library modules and abstract types eliminate much of the labour and complexity of meta-programming. An analysis of the sources of interpretation overhead is conducted, and an idiom for the construction of potentially e cient interpreters is developed. Carefully designed interpreters are improved signi cantly by a basic partial evaluator, but not all interpreter designs are susceptible. Experiments suggest that specialised interpreters can be improved still further by speci c low-level mechanisms. SLDQE-resolution, a novel computational model for the compilation of programs containing universally quanti ed implication formulas, is also presented. The problem of providing a language for declarative meta-programming that is both adequately expressive and e ciently executable is not completely solved, but this work demonstrates that the possibilities of a simple ground representation deserve to be taken seriously.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Control Techniques for Complex Reasoning: The Case of MILORD II

In this paper we survey MILORD II, a KBS design tool. We concentrate on its object level and meta-level languages, with special emphasis on the control techniques and the comunication between both languages. The control, declarative in nature, is based on reflection techniques over a meta-language equipped with a declarative backtracking mechanism. Reflection and subsumption techniques are used...

متن کامل

Programming with Sets and Multisets

I briefly discuss the facilities for programming with sets and multisets provided by the programming language Escher, which is a general-purpose, declarative language that integrates the best features of both functional and logic programming languages. Escher has types and modules, higher-order and meta-programming facilities, concurrency, and declarative input/output. The main design aim is to...

متن کامل

Live Programming in the LogicBlox System: A MetaLogiQL Approach

The emerging category of self-service enterprise applications motivates support for “live programming” in the database, where the user’s iterative data exploration triggers changes to installed application code and its output in real time. This paper discusses the technical challenges in supporting live programming in the database and presents the solution implemented in the LogicBlox commercia...

متن کامل

Declarative semantics of a meta-programming language?

We present a logical programming language, generative clause programs, which generalize definite clause programs with a meta-programming level. The fundamental notion in the language is that of a meta-goal which consists of a plain goal together with a program in which it is expected to be true. The declarative semantics can be defined in terms of Herbrand models consisting of such meta-goals. ...

متن کامل

Generating Declarative Language Bias for Top-Down ILP Algorithms

Many of today's algorithms for Inductive Logic Programming (ILP) put a heavy burden and responsibility on the user, because their declarative bias have to be deened in a rather low-level fashion. To address this issue, we developed a method for generating declarative language bias for top-down ILP systems from high-level declarations. The key feature of our approach is the distinction between a...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998